using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace MoEngine
{
    public class ImagePanel : Window
    {
        public ImagePanel(WindowBase parent, Texture2D image)
            : base(parent)
        {
            m_Image = image;
            m_SpriteBatch = new SpriteBatch(Core.GlobalDevice);
        }

        protected Texture2D m_Image;

        public Texture2D Image
        {
            get { return m_Image; }
            set { m_Image = value; }
        }

        //protected SpriteBatch m_SpriteBatch;

        protected override void DrawWindow(GameTime time)
        {
            base.DrawWindow(time);
            m_SpriteBatch.Begin();
            m_SpriteBatch.Draw(m_Image, DrawPos, Color.White);

            m_SpriteBatch.End();
        }
    }
}
